import {
    MixingFormulaConfigs, MixPipeConfigs
} from "db://assets/proto/shared/v1/configs";
import {GlobalConfigsLoader} from "db://assets/script/global-configs-loader";
import Long from "long";

export class MixingConfigsLoader {

    findMixPipeConfig(pipeTag: string, level: number): MixPipeConfigs | undefined {
        const plc = GlobalConfigsLoader.instance.getMixPipeConfigs()
        return plc.get(pipeTag + level)
    }

    findMixFormulaConfig(formulaId: Long): MixingFormulaConfigs | undefined {
        const plc = GlobalConfigsLoader.instance.getMixingFormulaConfigs()
        return plc.get(formulaId.toString())
    }

}

export const mixingConfigsLoader = new MixingConfigsLoader();